#include "ac_tlm_per.h"



using user::ac_tlm_per;


ac_tlm_per::ac_tlm_per( sc_module_name module_name , int k ) :sc_module( module_name ){
	target_export( *this );
	data1 = 0;
	data2 = 0;
	saida = 0;
	lock = 0;
}

/// Destructor
ac_tlm_per::~ac_tlm_per() {
}

/**
 * Escreve o valor pedido
 */
void ac_tlm_per::writem( const uint32_t &a , const uint32_t &d ){
	/**param1 = (void *)0x500004;
	param2 = (void *)0x500044;
	saida = (void *)0x500084;
	if(a == 0x500004)
		data1 = d;
	else if(a == 0x500044)
		data2 = d;
	else{
		cout << "erro" << endl;
	*/
	}
}

/**
 * Guarda em um temporario
 * Seta em 1 o valor do lock
 * retorna o valor do temporario
 */
uint32_t ac_tlm_per::readm( const uint32_t &a , uint32_t &d ){
	/**if(a == 0x500084){
		saida = data1 * data2;
		return saida;
	}else{
		cout << "erro" << endl;
		return 0;
	*/
	}
	
}



